package org.bonorsoft.modules.wechat.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.bonorsoft.modules.wechat.entity.WxRequest;

import java.util.List;

public interface WxRequestMapper extends BaseMapper<WxRequest> {


    @Select("SELECT qqid, hybt, hynr, tjrid, tjrxm, tjsj " +
            "FROM hy_qq ${ew.customSqlSegment} ")
    IPage<WxRequest> paging(Page<WxRequest> page, @Param(Constants.WRAPPER) QueryWrapper<WxRequest> queryWrapper);

    @Select("SELECT qqid, hybt, hynr, tjrid, tjrxm, tjsj " +
            "FROM hy_qq " +
            "order by tjsj desc ")
    List<WxRequest> list();
}
